package top.heliming.leyou.userconsumer.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import top.heliming.leyou.userconsumer.bean.User;
import top.heliming.leyou.userconsumer.config.FeignConfig;
import top.heliming.leyou.userconsumer.service.impl.UserFeignClientFallback;

/**
 * description: //TODO
 *
 * @author: heliming
 * @date:2019/05/25 上午 11:47
 */
@FeignClient(value = "user-service", fallback = UserFeignClientFallback.class, configuration = FeignConfig.class)
public interface UserFeignClient {

  @GetMapping("/user/{id}")
  User queryUserById(@PathVariable("id") Long id);

}
